home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / util / misc / MIOHandler.lha / mio-handler-1.0 / Install < prev    next >
Text File  |  1995-05-12  |  2KB  |  78 lines

  1. ;
  2. ; MIO-Device
  3. ;
  4. ; © 1995 Peter Westerström, All Rights Reserved.
  5. ;
  6.  
  7. (set #handler      (cat "MIO-Handler"))
  8.  
  9. (set mode
  10.      (askchoice
  11.          (prompt @app-name)
  12.          (help @askchoice-help)
  13.          (choices "Install" "Remove")
  14.      )
  15. )
  16.  
  17. (if mode
  18.         (set pmode "Remove")
  19.         (set pmode "Install")
  20. )
  21.  
  22. ; get handlers dir
  23. (set handlersdir
  24.         (askdir
  25.                 (prompt "Where do the Handlers belong")
  26.                 (help @askdir-help)
  27.                 (default "L:")
  28.         )
  29. )
  30.  
  31. ; now do install or remove
  32. (if mode
  33.         ; Remove
  34.         (
  35.                 ; Show what we are doing
  36.                 (working "Removing " @app-name)
  37.  
  38.                 ; Remove the non-standard pieces
  39.                 (delete (tackon handlersdir  #handler))
  40.                 (trap 4 (delete "devs:DOSDrivers/MIO" (infos)))
  41.                 (trap 4 (delete "sys:Storage/DOSDrivers/MIO" (infos)))
  42.  
  43.                 ; Don't want to use the confusing "Installation Complete" message
  44.                 ; when what we really did was remove things...
  45.                 (message "The \"" @app-name "\" components "
  46.                          "that you specified have been successfully removed")
  47.                 (exit (quiet))
  48.         )
  49.  
  50.         ; Install
  51.         (
  52.                 (working "Installing " @app-name)
  53.  
  54.                 ; Install the handler
  55.                 (copylib
  56.                         (prompt (cat "Copying " @app-name))
  57.                         (help @copylib-help)
  58.                         (source #handler)
  59.                         (dest handlersdir)
  60.                         (confirm)
  61.                 )
  62.  
  63.                 ; Install the descriptors
  64.                 (copyfiles
  65.                         (prompt "Copying the DOSDriver description")
  66.                         (help @copyfiles-help)
  67.                         (source "MIO")
  68.                         (dest "DEVS:DOSDrivers/")
  69.                         (infos)
  70.                         (confirm)
  71.                 )
  72.  
  73.         )
  74. )
  75.  
  76. (set @default-dest handlersdir)
  77.  
  78.